package com.xasxt.book.app.web;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xasxt.book.app.entity.Role;
import com.xasxt.book.app.entity.User;
import com.xasxt.book.app.service.LogService;

@RestController
public class LogController {

	@Autowired
	private  LogService  logService;
	
	
	@RequestMapping("findLogWithPage")
	public Map<String,Object>findLogWithPage(int page,int rows){
		Map<String,Object>map=new HashMap<String,Object>();
		map.put("page", (page-1)*rows);
		map.put("rows", rows);
		Map<String,Object>mapResult=new HashMap<String,Object>();
		mapResult.put("total", logService.getLogCount(map));
		mapResult.put("rows", logService.findLogWithPage(map));
		return mapResult;
	}

}
